package xjtu;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.aggregator.ArgumentsAccessor;
import org.junit.jupiter.params.provider.CsvSource;

import static org.junit.jupiter.api.Assertions.*;
class CalculatorParameterizedTest {

    Calculator c = new Calculator();
    @ParameterizedTest
    @CsvSource({"10,20,30","0,0,0","10,-20,-10"})
    void Test(ArgumentsAccessor args){
        assertEquals(args.getInteger(2).intValue(),c.add(args.getInteger(0),args.getInteger(1)));
    }
}
